<template>
  <view>
     <view class="box" @click="showT">请选择</view>
  </view>
</template>

<script setup lang="js">
const showT = () => {
  let itemList = ['item1', 'item2', 'item3'];
 uni.showActionSheet({
   title: '请选择',//可选
   itemColor: 'red',//可选
   itemList: itemList,
   success: function (res) {
     console.log(res.tapIndex,itemList[res.tapIndex])
   },
 })
}


</script>


<style scoped lang="scss">
.box{
  height: 40px;
  width: 100%;
  background-color: red;
  margin-top: 10px;
  text-align: left;
  line-height: 40px;
}
</style>
